package entidades;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * The persistent class for the materia database table.
 * 
 */
@Entity
@Table(name="materia")
public class Materia implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="codMateria")
	private int codMateria;

	@Column(name="nome")
	private String nome;
	
	@ManyToOne
	@JoinColumn(name="professor_codProfessor")
	private Professor professor;

	public Materia() {
	}

	public int getCodMateria() {
		return this.codMateria;
	}

	public void setCodMateria(int codMateria) {
		this.codMateria = codMateria;
	}

	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}
}